﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.Diagnostics;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Data.Entity.ModelConfiguration;
using System.Reflection;
using System.ComponentModel.DataAnnotations;

namespace BugTracker.Models
{
    public class Issue
    {
        [Key]
        public int issue_idPK { get; set; }
        [Column]
        public int user_idFK { get; set; }
        [Required(ErrorMessage = "Issue Summary is Required")] 
        public string issue_summary { get; set; }
        //[DisplayFormat(DataFormatString = "{0:d}")]
        [Required(ErrorMessage = "Target Resolution Date is Required")] 
        [DataType(DataType.Date)]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
        public DateTime target_resolutiondate { get; set; }
        //[DisplayFormat(DataFormatString = "{0:d}")]
        [Required(ErrorMessage = "Actual Resolution Date is Required")] 
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
        [DataType(DataType.Date)]
        public DateTime actual_resolutiondate { get; set; }
        public string priority { get; set; }
        public string status { get; set; }
        public int project_idFK { get; set; }
        [Required(ErrorMessage = "Issue Name is Required")] 
        public string issue_name { get; set; }
        //[DataType(DataType.Date)]
        //[DisplayName("Birthday:")]
        //[DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}")]
        //[DataType(DataType.Date)]
        public string date_identified { get; set; }

    }
}